/*
 * 作者:熊猫
 * 日期:2017 - 3 - 15 4 - 2 - 32
 *
 */

package net.lainiao.morethread.Chapter6.demo5;

import java.util.concurrent.ConcurrentSkipListMap;

/**
 * Created by Administrator on 2017/3/15.
 */
public class Task implements Runnable {
    private ConcurrentSkipListMap<String, Contack> map;
    private String id;
    public Task(ConcurrentSkipListMap<String, Contack> map,String id) {
        this.map = map;
        this.id=id;
    }

    @Override
    public void run() {
        for (int i = 0; i < 1000; i++) {
            Contack contack=new Contack(id,String.valueOf(i+1000));
            map.put(id+contack.getPhone(),contack);
        }
    }
}
